package 课后作业;

import java.util.Scanner;

//计算器类
public class Calculator {
    double num1;
    double num2;


    //加法
    public double sum(double num1, double num2) {
        return num1 + num2;

    }


    public double sub(double num1, double num2) {
        return num1 - num2;

    }


    public double div(double num1, double num2) {
        return num1 / num2;

    }

    public double mul(double num1, double num2) {
        return num1 * num2;

    }


}